package com.java;

public class Test12 {
    public static void main(String[] args) {
        int ret = 0;
        double sum = 0;
        for(int i = 1; i <= 100; i++) {
            ret = i;
            if (ret % 2 == 0) {
                ret = -ret;
            }
            sum += 1.0 / ret;
        }
        System.out.println(sum);
    }
}
